<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"> 
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>捷豹英仕挑战赛</title> 
    <link rel="stylesheet" href="/Public/Home/css/font.css" />
    <link rel="stylesheet" href="/Public/Home/css/check.css" />
    <script type="text/javascript" src="/Public/Home/js/jquery.min.js"></script> 
	<script src="/Public/Home/js/adaptUILayout.js"></script> 
	<script language="javascript">
		adaptUILayout.adapt(640);
	</script> 
</head>
<body> 
<div id="body">
	<div id="bg"></div>
	<div class="p1">
		<img class="p1_img" src="/Public/Home/image/reg/logo.png" />
		<p class="p1_info" style="font-family: 'Jaguar-Regular'; font-weight: normal;">THE ART OF<br /><b style="font-family: 'Jaguar-Regular';font-weight: normal;">PERFORMANCE</b><br />TOUR</p>
		<h2 class="p1_title">捷豹英仕挑战赛</h2>
		<input id="txt_phone" class="p1_txt" type="tel" placeholder="请输入您的手机号码" />
		<div class="p1_btn" id="sub_btn">提交</div>
	</div>
	<div class="p2" style="display: none">
		<h2 id="uname">{$user.namestr}</h2>
		<h3>欢迎参加捷豹英仕挑战赛！</h3>
		<div class="btnbox">
			<div class="btn btn1 link" link="/index.php/Home/Dome/pvq">探索您的非凡座驾</div>
			<div class="btn btn2 link" link="/index.php/Home/Jaguar/info">活动信息</div>
			<img class="ewm" id="uewm" src="{$user.img}" style="width: 254px; height:254px; " />
			<div class="btn btn2 btn3 link"link="/index.php/Home/Jaguar/game">挑战开启</div>
		</div>
		<p>
			请于活动现场扫描二维码<br />开启捷豹英仕挑战赛<br />
			<small>(请妥善保存您的专属二维码，作为活动签到及通关的身份凭证。)</small>
		</p>
	</div>
	<div class="p3" style="display: none; ">
		<img class="error_ico" src="/Public/Home/image/reg/error_ico.png" />
		<p class="error_txt">
			抱歉，<br />您的手机号尚未进行注册<br />请点击下方进入活动注册页面，谢谢！
		</p>
		<div class="error_btn link" link="/index.php/Home/Jaguar/reg">注册</div>
		<!-- <p class="error_info">(点击注册将跳转至JDX注册页面)</p> -->
	</div>
</div> 
<script language="javascript">
$(function(){
<if condition="$user.id gt 0">
	$('.p1').hide();
	$('.p2').show();
<else />
	setTimeout(function(){ $('#sub_btn').fadeIn(); },3000);
	$('#sub_btn').click(function(){
		var phone = $('#txt_phone').val();
		if(phone.length<11) { alert('手机号码输入有误'); return false; }
		var url = '/index.php/Home/Jaguar/docheck/phone/'+phone;
		$.getJSON(url,function(obj){
			if(obj.s){
				$('#uname').text(obj.d.username.substr(0,1)+obj.d.sex);
				$('#uewm').attr('src','/index.php/Home/Jaguar/getEWM/uid/'+obj.d.id);
				$('.p1').fadeOut(function(){
					$('.p2').fadeIn();
				});
			}else{
				$('.p1').fadeOut(function(){
					$('#bg').addClass('blur');
					$('.error_ico').addClass('shake');
					$('.p3').fadeIn();
				});
			}
		});
	});	
</if>
	$('.link').on('click',function(){
		var url = $(this).attr('link');
		if(!url) return false;
		location.href = url ;
	});
});
</script>
</body>
</html>